<template>
  <div class="header">
    <div class="header-left">返回</div>
    <div class="header-input">输入景点/游玩/主题</div>
    <router-link to="/city">
      <div class="header-right">{{ this.city }}</div>
    </router-link>
  </div>
</template>

<script>
import { mapState } from "vuex";
export default {
  name: "HomeHeader",
  computed: {
    ...mapState(["city"]),
  },
};
</script>

<style lang="stylus" scoped>
.header {
  display: flex;
  line-height: 0.86rem;
  background: #00bcd4;
  color: #fff;
}

.header-right {
  color: #fff;
}

.header-left {
  line-height: 1.86rem;
  width: 1.6rem;
  float: left;
}

.header-input {
  flex: 1;
  height: 0.9rem;
  margin-left: 0.2rem;
  margin-top: 0.4rem;
  background: #fff;
  border-radius: 0.1rem;
  color: #ccc;
}

.header-right {
  width: 1.24rem;
  line-height: 1.86rem;
  float: right;
  text-align: center;
}
</style>